//
//  UIImage+Extension.swift
//  XinLang
//
//  Created by 张辉 on 16/5/10.
//  Copyright © 2016年 张辉. All rights reserved.
//

import UIKit

extension UIImage {

    class  func cz_singleDotImage(color :UIColor) ->UIImage{
    
    
    //开启图形上下文
        UIGraphicsBeginImageContextWithOptions(CGSizeMake(1, 1), false, UIScreen.mainScreen().scale)
        
        color.setFill()
        
        UIRectFill(CGRectMake(0, 0, 1, 1))
        
       let resultImage =   UIGraphicsGetImageFromCurrentImageContext()
    
    
       UIGraphicsEndImageContext()
        
       return resultImage
    }




}